/*
 * object.h
 *
 *  Created on: 21.03.2009
 *      Author: Christian Stupp
 */

#ifndef OBJECT_H_
#define OBJECT_H_

#include <map>
#include <vector>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include "abstractObject.h"
#include "files.h"
#include "intToStr.h"
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include<memory>
#include<stack>

namespace oal {
	class object: public abstractObject {
	protected:
		std::vector< object* >	items;
	public:
		int currentPosition;
		std::map<std::string, std::string> 	configuration;
		object();
		object(std::string newModelName);
		//object & operator= (const object &);

		virtual ~object();
		virtual std::string get(std::string key);
		virtual bool set(std::string key, std::string value);
		virtual object* current();
		virtual void append(object*);
		virtual bool hasNext(void);
		virtual void next(void);
		virtual array getValues(void);
		virtual void setValues(array & newValues);
		virtual std::string debugIt(void);
		virtual std::string getIteratorData(std::string type,string tabLevel="");
		virtual std::string printIteratorData(std::string type, array* values,string tablevel);

		bool parseConfiguration(std::string fileName, std::string linebreak = "\n",std::string seperator = ":");
		void putConfigurationContentIntoObject(std::string content);
		void setConfiguration(std::string modelName);
		void eraseComments(std::string *content);
		bool deleteFile(std::string fileName);
		std::string loadContentFromStdin(void);
		int getIdByName(std::string name, std::string value);
		std::string getXmlContent(void);
		bool isFile(std::string fileName);
	};
};
#endif /* OBJECT_H_ */
